package com.hlf.modules.merchant.goods.service;



import com.hlf.common.utils.PageUtils;
import com.hlf.modules.merchant.goods.entity.Goods;
import com.hlf.modules.sys.entity.SysUserEntity;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/***
 * 商品服务接口
 * @author Administrator
 *
 */
public interface GoodsService {

	/**
	 * 查询单个商品
	 * @param id
	 * @return
	 */
	Goods queryObject(Long id);

	List<Goods> queryList(Map<String, Object> map);

	int queryTotal(Map<String, Object> map);

	void save(Goods goods);

	/**
	 * 选择性新增
	 * @param goods
	 * @return
	 */
	int insertSelective(Goods goods);

	PageUtils queryListForPage(Map<String, Object> map);

	/**
	 * 批量逻辑删除
	 * @param goodsIdList
	 * @param userId
	 * @return
	 */
    int batchUpdateDel(List<Long> goodsIdList, Long userId);

	/**
	 * 修改
	 * @param goods
	 * @return
	 */
	int updateByPrimaryKeySelective(Goods goods);

	/**
	 * 根据门店id查商品集合
	 * @param storeId
	 * @return
	 */
	List<Goods> queryListForStoreId(Long storeId);

    /**
     * 查询本店茶位费
     * @param storeId
     * @return
     */
    Goods queryTeaForStoreId(Long storeId);
	/**
	 * 创建
	 * @param merchantId
	 * @param name
	 * @param goodsTypeId
	 * @param sellPrice
	 * @param remainQty
	 * @param goodsImgFilesJson
	 * @param dailyStock
	 * @param user
	 */
    void create(String merchantId, String name, String goodsTypeId, String sellPrice, String remainQty, String goodsImgFilesJson, String dailyStock, SysUserEntity user);

	/**
	 * 修改
	 * @param goodsId
	 * @param name
	 * @param goodsTypeId
	 * @param sellPrice
	 * @param remainQty
	 * @param dailyStock
	 * @param goodsImgFilesJson
	 * @param request
	 */
	void updateGoods(String goodsId, String name, String goodsTypeId, String sellPrice, String remainQty, String dailyStock, String goodsImgFilesJson, HttpServletRequest request);

	/**
	 * 售罄/上下架/修改茶位费
	 * @param goodsId
	 * @param status
	 * @param request
	 * @param teaPri
	 */
	void updateGoodsStatus(String goodsId, String status, HttpServletRequest request, String teaPri);
}
